import cn.yunhe.service.IuserService;
import com.github.pagehelper.Page;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.HashMap;
import java.util.Map;

public class test {
    ApplicationContext ac=null;
    @Before
    public  void init(){
        ac = new ClassPathXmlApplicationContext("spring/spring-mybatis.xml");

    }
    @Test
    public  void test1(){
        IuserService  userService =(IuserService) ac.getBean("userService");
        Map<String,Object> map = new HashMap<String, Object>();
        map.put("pageNum",1);
        map.put("pageSize",5);
        Page page = userService.getLikeUsers(map);
        System.out.println(page);
    }
}
